@font-face {
    font-family: "Source Sans Pro";
    font-weight: 400;
    src: local("Source Sans Pro"),
         local("Noto Sans"),
         url("/static/fonts/source-sans-pro-ascii.ttf");
}

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html {
    font-size: 12pt;
    font-weight: 400;
    font-family: "Source Sans Pro",
                 "Noto Sans",
                 Arial,
                 Helvetica,
                 "WenQuanYi Micro Hei",
                 "Source Han Sans",
                 "Noto Sans CJK",
                 "Microsoft YaHei",
                 "SimHei",
                 sans-serif;
}

body {
    display: flex;
    justify-content: center;
}

html, body {
    color: black;
    background: #F0F6FF;
    width: 100%;
}

p {
    color: #333;
    text-indent: 2em;   /* em instead of rem intentionally */
    margin-top: 0.3rem;
    margin-bottom: 0.3rem;
    text-align: justify;
}

.header-split {
    display: flex;
    flex-direction: column;
    width: 100%;
}

header {
    background: #69F;
    box-shadow: 0 0 2px #025;

    padding-top: 0.5rem;
    padding-left: 1rem;
    padding-right: 2rem;
    padding-bottom: 0.4rem;

    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
}

.site-name {
    font-size: 1.6rem;
    color: #ACF;
}
.site-name:hover {
    color: #DEF;
}

.header-control {
    display: flex;
    flex-wrap: wrap;
    margin: 0 0.2rem;
}

.header-control > * {
    margin-top: 0.3rem;
    white-space: nowrap;
    color: #DEF;
}

.header-control > *:not(:last-child) {
    margin-right: 1rem;
}

.header-control-separator::before {
    content: "/";
    margin: 0 0.5rem;
}

.menu-split {
    display: flex;
    flex-wrap: wrap;
}

.menu-split > aside {
    width: 10rem;
    padding: 1rem 0;

    display: flex;
    flex-direction: column;
}
.menu-split > aside > *:first-child {
    margin-top: 0;
}

.content-wrapper {
    flex: 1;
    padding: 1rem;
    padding-bottom: 5rem;
}

@media (max-width: 30rem) {
    .menu-split > aside {
        width: 100%;
    }
    .content-wrapper {
        border-top: 1px dashed #BBD6FF;
    }
    a.main-link {
        border-radius: 0 !important;
    }
}

.post-list {
    display: flex;
    flex-direction: column;
}

.post-list-item {
    display: flex;
    border-bottom: 1px dashed #AAA;
    align-items: baseline;
}

.post-list-item:hover {
    border-bottom-style: solid;
    background: rgba(0, 0, 0, 0.05);
}

.post-list-item-title {
    font-family: monospace;
    padding: 0.8rem 0.5rem;
    padding-bottom: 0.4rem;
    flex: 1;
}

.post-list-item-author {
    font-family: monospace;
}

.post-list-item-author::before {
    content: "作者：";
    font-size: 0.7rem;
}

pre.block {
    margin: 0.5rem;
    padding: 0.5rem;
    border: 1px solid rgba(255, 0, 160, 0.3);
    border-radius: 0.2rem;
    color: rgb(0, 0, 100);
    background: rgba(255, 0, 160, 0.05);
    overflow-x: auto;
}

.error-title {
    color: rgb(255, 0, 160);
    font-size: 1.5rem;
    margin: 0.5rem;
}

.post-title {
    font-family: monospace;
    font-size: 1.5rem;
    color: rgb(255, 128, 0);
}

.post-author {
    font-size: 0.8rem;
    color: rgba(0, 0, 0, 0.5);
}

.post-author::before {
    content: "作者：";
    font-size: 0.8rem;
    color: rgba(0, 0, 0, 0.5);
    margin-left: 0.5rem;
}

.post-body {
    margin: 1rem;
    font-family: monospace;
    min-height: 10rem;
}

a {
    text-decoration: none;
    color: inherit;
    border-bottom: 1px dashed transparent;
}

a:not(.block):not(.disabled):not(.main-link):not(.list-item-link):hover {
    border-bottom-color: inherit;
}

a.sub-link {
    margin: 0.1rem;
    margin-left: 1.5rem;
    margin-right: 0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
}
a.sub-link.current-page {
    border-left-color: #69F;
}

a.main-link {
    padding: 0.5rem 1rem;
    margin-top: 0.5rem;
    margin-bottom: 0.2rem;
    font-size: 1.1rem;

    border-top-right-radius: 0.2rem;
    border-bottom-right-radius: 0.2rem;
}
a.main-link:hover {
    background: #DDE7FF;
}
a.main-link.current-page {
    background: #BBD6FF;
}

a.disabled {
    text-shadow: 0.02rem 0.02rem 0.01rem white, 0 0 0 black;
    color: #BCD;
    cursor: not-allowed;
}

.block {
    display: block;
}

.not-exist {
    text-align: center;
    text-shadow: 0.02rem 0.02rem 0.01rem white, 0 0 0 black;
    color: rgba(170, 170, 170, 0.5);
}

.comment-list {
    display: flex;
    flex-direction: column;
    margin-top: 0.5rem;
    border-top: 1px dashed rgba(0,0,255,0.3);
    padding: 0.2rem;
}

.card {
    display: flex;
    flex-direction: column;
    margin: 0.5rem;
    padding: 0.5rem;
    background: #FFF;
    border: 1px solid #BBD6FF;
    border-radius: 0.2rem;
}

.card > .card-title {
    color: #469;
    font-size: 1.2rem;
    padding: 0.2rem 0.5rem;
    border-bottom: 1px solid #BBD6FF;
}

.card > .card-body {
    font-size: 1rem;
    padding: 0.4rem 0.5rem;
    color: #555;
}


.pager {
    display: flex;
    justify-content: space-between;
    margin: 0.3rem;
}

.icon-label {
    margin-left: 0.3em;
}


form {
    display: flex;
    justify-content: center;
}

form .form-body {
    flex: 1;
    max-width: 50rem;
    display: flex;
    flex-direction: column;
}

form .field {
    margin: 0.2rem 0;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
}
form .field > .field-label {
    width: 10rem;
    min-width: 10rem;
    text-align: right;
    margin-bottom: 0.2rem;
    margin-right: 1rem;
    color: #666;
}
form .field > *:not(.field-label) {
    flex: 2;
}
@media (max-width: 36rem) {
    form .field > .field-label {
        flex: 1;
        text-align: center;
        margin-right: 0;
    }
    form .field > .field-label::after {
    }
}

form .form-controls {
    display: flex;
    align-items: center;
    min-height: 2.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

form .form-controls > a {
    margin-right: 1rem;
}

form .form-error {
    color: red;
    white-space: pre-line;
    text-align: center;
}

form .form-controls > button {
    font-size: 1rem;
    padding: 0.5rem;
    outline: none;
    border: none;
    color: rgba(0, 0, 255, 0.9);
    background: transparent;
    cursor: pointer;
    transition: all ease-out 0.1s;
}

form .form-controls > button:hover {
    background: rgba(0, 0, 255, 0.1);
}

form .form-controls > button:focus:not(:hover),
form .form-controls > button:active {
    background: rgba(0, 0, 255, 0.05);
}

input,
textarea {
    outline: none;
    color: black;
    background: #F0F6FF;
    border: 1px solid #BBD6FF;
    font-size: 1rem;
    padding: 0.4rem;

    transition: all ease-out 0.1s;
    min-width: 10rem;
}

input:not([readonly]):focus,
textarea:not([readonly]):focus {
    border-color: #8BF;
    padding-left: 0.7rem;
    box-shadow: -2px 0 2px rgba(26, 124, 255, 0.29);
}
input[type="date"] {
    height: 2.05rem;
    padding-top: 0rem;
    padding-bottom: 0rem;
}
input[readonly],
textarea[readonly] {
    border: 1px dashed #8BF;
    background: #FFF;
}

textarea {
    resize: vertical;
    min-height: 10rem;
}

.error-message {
    color: red;
    margin: 0.5rem;
    margin-top: 1rem;
}

.radio-box {
    display: flex;
    border: 1px solid #BBD6FF;
    min-width: 10rem;
    flex-wrap: wrap;
}
.radio-box[readonly] {
    border: 1px dashed #8BF;
}

.radio-box > label {
    min-width: 5rem;
    display: flex;
    flex: 1;
}
@media (max-width: 36rem) {
    .radio-box > label {
        min-width: 100%;
    }
}

.radio-box > label > input[type="radio"] {
    display: none;
}

.radio-box > label > .radio-text {
    padding: 0.4rem;
    background: #F0F6FF;
    flex: 1;
    text-align: center;
}
.radio-box:not([readonly]) > label > .radio-text:hover {
    background: #FFF;
    cursor: pointer;
}
.radio-box > label > input[type="radio"]:checked + .radio-text {
    background: #BBD6FF;
}
.radio-box > label > input[type="radio"] + .radio-text::before {
    content: "\f096";       /* square-o */
    font-family: FontAwesome;
    font-weight: normal;
    font-style: normal;
    padding-right: 0.5rem;
}
.radio-box > label > input[type="radio"]:checked + .radio-text::before {
    content: "\f046";       /* check-square-o */
    margin-right: -0.15em;  /* offset compensation between [check-]square-o*/
}
.radio-box[readonly] > label > input[type="radio"]:not(:checked) + .radio-text {
    color: #AAA;
    background: #FFF;
}
.radio-box[readonly] > label > input[type="radio"]:checked + .radio-text {
    background: repeating-linear-gradient(135deg, rgba(136, 187, 255, 0.2), rgba(136, 187, 255, 0.2) 2px, white 2px, white 4px);
}


.list {
    display: flex;
    flex-direction: column;
}
.list-item {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    padding: 0.2rem;
    border-bottom: 1px dashed #BBD6FF;
}
.list-item:hover {
    border-bottom: 1px solid #BBD6FF;
    background: #F0F6FF;
}
.list-item > :first-child {
    flex: 1;
}

.list-item-link {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    min-width: 15rem;
    padding: 0.2rem;
}

.list-item-title {
    flex: 1;
    color: #469;
    font-size: 1.1rem;
    margin-right: 0.7rem;
    min-width: 5rem;
}

.list-item-body {
    flex: 2;
    color: #888;
    font-size: 0.9rem;
    text-align: left;
}

@media (max-width: 40rem) {
    .list-item-link {
        min-width: 10rem;
    }
    .list-item-title {
        min-width: 10rem;
    }
    .list-item-body {
        flex: 1;
        text-align: right;
        min-width: 10rem;
    }
}

.list-item-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.list-item-controls > * {
    margin-left: 1rem;
}


/******** welcome page ********/
.welcome {
    width: 100%;
    background: #359;
}

.welcome .cover {
    width: 100%;
    height: 100vh;
    min-height: 20rem;
    padding: 1rem;

    color: #DEF;
    background-color: #69F;
    background-image:
            linear-gradient(to bottom,
                    transparent, rgba(102,153,255,0.9) 70vh, #69F 80vh),
            repeating-linear-gradient(110deg,
                    transparent, rgba(151, 216, 255, 0.2) 50vw,
                    transparent 1px, rgba(151,216,255,0.2) 70vw,
                    transparent 1px, rgba(151,216,255,0.2) 80vw,
                    transparent 1px, rgba(151,216,255,0.2) 120vw);

    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;

    box-shadow: 0 0 2px black;
}

.welcome > .cover .main {
    flex: 2;
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
}
.welcome > .cover aside {
    flex: 1;
    min-width: 10rem;
    padding: 1rem;

    display: flex;
    justify-content: center;
}

.welcome .actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex-basis: 12rem;
}

.welcome .register {
    flex: 1;

    margin: 0.5rem;
    padding: 1rem;
    border-radius: 0.2rem;

    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    font-size: 1.2rem;
    background: linear-gradient(to bottom, #A023FF, #950AFF 90%, #950AFF);
    color: #FFE6F6;

    outline: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease-out;
}
.welcome .register:hover,
.welcome .register:focus {
    transform: translateY(-1px);
}
.welcome .register:hover {
    box-shadow: 0 1px 7px rgba(0, 0, 0, 0.5);
}
.welcome .register:active,
.welcome .register:focus {
    border-color: #7000C5;
}
.welcome .register:active {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    transform: translateY(0px);
}

.welcome .login {
    padding: 0.3rem 1rem;
    margin: auto;
}

.welcome .title {
    display: flex;
    flex-direction: column;
}

.welcome .title-text {
    color: #FFF;
    font-size: 4rem;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.welcome .beta {
    margin: 0.5rem;
    padding: 0.3rem;
    border-radius: 0.2rem;

    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
    font-size: 0.9rem;
    background: #FD0;
    color: #359;
}

.welcome .beta::after {
    content: "*";
}

.welcome .description {
    margin-left: 1rem;
}

.welcome .beta-footnote {
    margin-left: 1rem;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.welcome .beta-footnote::before {
    content: "* ";
}

.welcome footer {
    padding: 2rem;
    min-height: 6rem;
    color: #8BF;

    display: flex;
}

.x-split-2-1 {
    display: flex;
    flex-wrap: wrap;
}
.x-split-2-1 >:first-child {
    flex: 5;
}

@media (max-width: 65rem) {
	.x-split-2-1 >:last-child {
		flex: 3;
	}
}

a:not([href]) {
    cursor: not-allowed;
    color: #BCD;
}

